﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="numbercontrol.aspx.cs" Inherits="Business_numbercontrol" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>学院数量控制</title>
    <link rel="stylesheet" type="text/css" href="../js/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../js/themes/icon.css"/>
	<link rel="stylesheet" type="text/css" href="../CSS/Style.css"/>
    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script> 
	<script type="text/javascript">
//	//图片预加载
//	jQuery.preloadImages = function() {  
//     // 遍历图片  
//    for ( var i = 0; i < arguments.length; i++) {  
//        jQuery("<img>").attr("src", arguments[i]);  
//    }  
//}  
//	$(function() {$.preload("../js/themes/default/images/layout_button_down.gif","../js/themes/default/images/layout_button_up.gif"); });
    $(function(){
        if($("#ddlPlanCode").val()=="项目编号"&&$("#ddlPlanCodeN").val()=="项目编号") { 
           $(".a_edit").hide();} 
        else{
           $(".a_edit").show(); 
        } 
        $("#btnSubmit").hide();
        if($("#ddlPlanCode").attr("disabled")==true&&$("#ddlPlanCodeN").attr("disabled")==true) 
           $("#btnSubmit").show(); 
     });
  function toggle_collapse(tar){
  var temp=$(tar) .attr("src");
  var target=$(tar).parent().parent().next("div").get(0);
  $(target).toggle() ;
  if(temp.indexOf("down")!=-1)
  {
    $(tar) .attr("src","../js/themes/default/images/layout_button_up.gif");
    $(tar) .attr("title","点击收起");  
    return false; 
   } 
  else(temp.indexOf("up")!=-1)
  {
    $(tar) .attr("src","../js/themes/default/images/layout_button_down.gif"); 
    $(tar) .attr("title","点击展开");   
      return false;  
   } 
  } 
  //绑定未完成change事件
  function ddlnchange(){
          if($("#ddlPlanCodeN").val()=="项目编号")
             return;
          $("#ddlPlanCode").val("项目编号");
          clearall();
          $(".a_edit").hide();
          $("#btnSubmit").show();} 
 //绑定已完成change事件
 function ddlchange(){
        if($("#ddlPlanCodeN").val()=="项目编号")
           return;
        $("#ddlPlanCodeN").val("项目编号"); 
        $("#btnSubmit").hide();}    
 function clearall(){
   $("input[name^='gvConfigNumber']").val("0"); }
 function configall(){
   $("#tool").toggle(); } 
 function configdone(){
   var textvalue=$("#allset").val();
   if(textvalue=="")
      textvalue="0";
   $("input[name^='gvConfigNumber']").val(textvalue);
   $("#tool").hide(); 
 } 
	</script>  
</head>
<body>
   <form id="form1" runat="server">
  <%-- <div style="background:#efefef;width:100%;">
	   <a href="#" target="mainwin" class="easyui-linkbutton" plain="true">项目计划</a>&nbsp;&nbsp;|
       <a href="#" target="mainwin" class="easyui-linkbutton" plain="true">历史项目</a>
       <a href="../Web/viewinfo.aspx" target="mainwin" style="float:right; margin:0; padding:0;"><img alt="返回" title="返回上级" src="../Images/GetBack.png" style="border:0; margin:0; padding:0;" /></a> 
	</div>--%>
	<center>
    <div class="curvy" style="text-align:left; margin-top:7px; width:96%;">
        <em class="ctl"><b>&bull;</b></em>
        <em class="cbl"><b>&bull;</b></em>
        <em class="ctr"><b>&bull;</b></em>
        <em class="cbr"><b>&bull;</b></em>
        <p>(1)此页面是第二部计划，您可在此页面进行学院的项目数量控制！<br />
               (2)一个项目开启计划分为两步：第一步是制定计划，第二部是分配数量，若只完成第一步则状态显示“未完成”，
              只有两部全完成才能开启计划。有错误请联系：15868887970 <br />
        </p>
    </div>	
   </center> 
    <div class="columns_container">
    <div class="columns_left" style="width:70%;">
        <div class="columns_left_padding">
	       <div class="heading_container">
	             <div class="heading_right_top">&nbsp;</div>
	             <h2>所有未完成计划</h2></div>
	       <div class="bucket_container">
	             <div class="bucket_top"><span>&nbsp;</span>&nbsp;</div>
	             <div class="bucket_content" style="padding:0px;" runat="server" id="undoneJob">
                   <%--  <div class="bucket_content_undone">
                         <div class="undone_header">
                             <span><img src="../js/themes/default/images/layout_button_down.gif" title="点击展开" alt="点击展开" onclick="toggle_collapse(this);" /></span>
                             <h2>编号为……的未完成！[建设时间:2010/11/7]</h2></div>
                         <div class="undone_table">
                             <table cellpadding="0" cellspacing="0">
                             <tbody>
                                 <tr>
                                     <td>类型：</td><td>新专业建设</td>
                                     <td>类别：</td><td>重点</td>
                                     <td>级别：</td><td>校级</td>
                                 </tr>
                                 <tr>
                                     <td>开启时间：</td><td colspan="2">5</td>
                                     <td>关闭时间：</td><td colspan="2">6</td>
                                 </tr>
                                <tr>
                                     <td>备注：</td><td colspan="5"></td>
                                </tr> 
                             </tbody>
                             </table>
                         </div>
                     </div>--%>
                   </div> 
	           <div class="bucket_bottom"><span>&nbsp;</span>
	           </div>
	   </div>
    </div>
    </div>
    <div class="columns_right">
       <div class="clear" style="padding-top: 4px;"></div> 
       <div style="width:400px;">
          <div class="heading_container">
	             <div class="heading_right_top">&nbsp;</div>
	             <h2>第二步->项目数量控制</h2></div>
	       <div class="bucket_container">
	      	     <div class="bucket_top"><span>&nbsp;</span>&nbsp;</div> 
	             <div class="bucket_content">
	               <div>
                          <asp:ScriptManager ID="ScriptManager1" runat="server">
                           </asp:ScriptManager>
	                   <div style="padding:15px 10px; ">
                           <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                               <ContentTemplate>
                                  <div>
                                      未完成：<asp:DropDownList ID="ddlPlanCodeN" runat="server" Width="100px">
                                      </asp:DropDownList>已完成：
                                      <asp:DropDownList ID="ddlPlanCode" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPlanCode_SelectedIndexChanged" Width="100px">
                                          </asp:DropDownList></div>
                                  <div style="padding-top:5px;">
                                       <a href="javascript:clearall()">清空所有</a> | <a href="javascript:configall()">整体配置</a> &nbsp; 
                                       <span id="tool" style="display:none;"><input id="allset" type="text" style="width: 45px" />&nbsp; <a href="javascript:configdone()">确定</a></span></div>         
                                  <div style="margin-top:1em;">
                                      <asp:GridView ID="gvConfigNumber" runat="server" AutoGenerateColumns="False" BorderStyle="None" CellSpacing="3" EnableTheming="True" GridLines="Horizontal" OnRowEditing="gvConfigNumber_RowEditing" ShowHeader="False" Width="350px" EmptyDataText="查询出错，请联系管理员！" OnRowCancelingEdit="gvConfigNumber_RowCancelingEdit" OnRowUpdating="gvConfigNumber_RowUpdating">
                                          <Columns>
                                              <asp:BoundField DataField="collegeid" ReadOnly="True" />
                                              <asp:BoundField DataField="collegename" ReadOnly="True" />
                                              <asp:TemplateField>
                                                  <ItemTemplate>
                                                      <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("number") %>'
                                                          Width="45px"></asp:TextBox>
                                                  </ItemTemplate>
                                              </asp:TemplateField>
                                              <asp:CommandField ShowEditButton="True" >
                                                  <ItemStyle CssClass="a_edit" />
                                              </asp:CommandField>
                                          </Columns>
                                      </asp:GridView>
                                  </div> 
                               </ContentTemplate>
                           </asp:UpdatePanel>
                           </div>
                   </div>
                   <div style="text-align:center;">
                       <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"  CssClass="btn-dy-blue"/></div>
	             </div> 
	             <div class="bucket_bottom"><span>&nbsp;</span> 
	       </div>
   </div> 
       </div>
    </div>
    </div>
    </form>
</body>
</html>
